<template>
	<div class="mainViewBig" v-bind:style="style">
		<!--头部-->
		<div class="headerTop">
			<div class="TimeForm">
				<div class="state">
					<img src="@/assets/back_manage_img/steadyRyn.png"/>
					<div class="DateForm">
						<p>安全生产</p>
						<p><span>{{ timestap }}</span> 天 </p>
					</div>
				</div>
				<div>
					<p class="date">{{ nowDate }} {{ nowWeek }} </p>
					<p class="date">{{ nowTime }}</p>
				</div>
			</div>
			<h1 class="header-title">{{ sysInfo.sysName }}</h1>
			<div class="header-bg"></div>
			<div class="TimeForm2">
				<p class="date"><img :src="weatherImg"/>{{ weather }}</p>
			</div>
		</div>
		<div class="large-board">
			<!--左 侧 列-->
			<div class="content-item1">
				<dv-border-box-1>
					<div class="nav_box">
						<p class="all_title">科研及创新实力</p>
						<div class="in_box in_box1">
							<li class="line" v-for="(item,index) in dataMaintainList" :key="index">
								<img :src="item.fileBlob"
									 style="width: 24px;height: 27px;position: relative;top: 16px;"/>
								<span class="name">{{item.pageKey}}</span>
								<span class="sub">{{item.pageContent}}</span>
								<span>{{item.extendValue3}}</span>
							</li>
						</div>
						<div class="fixed_line">
							<p><span class="el-icon-star-on"></span>ISO9001 国际质量管理体系认证</p>
							<p><span class="el-icon-star-on"></span>业内首家国家级「 QS认证 」</p>
							<p><span class="el-icon-star-on"></span>业内首家「 吸管10万级无菌化生产车间 」</p>
							<p><span class="el-icon-star-on"></span>产品远销亚欧美非全球20+ 国家和地区</p>
							<p><span class="el-icon-star-on"></span>行业首家成长板挂牌上市公司</p>
						</div>
					</div>
				</dv-border-box-1>

			</div>
			<!--中间列-->
			<div class="content-item2">
				<dv-border-box-1>
					<div class="nav_box">
						<p class="all_title">订单与产线机台动态</p>
						<div class="box_list">
							<div class="box_nav">
								<p class="box_inner"><span>{{orderDetail.total}}</span></p>
								<p class="box_name">本年订单</p>
							</div>
							<div class="box_nav box_nav2">
								<p class="box_inner"><span>{{orderDetail.complete}}</span></p>
								<p class="box_name">已完成</p>
							</div>
							<div class="box_nav box_nav7">
								<p class="box_inner"><span>{{orderDetail.completionRate}}%</span></p>
								<p class="box_name">完成率</p>
							</div>
							<div class="box_nav box_nav3">
								<p class="box_inner"><span>{{orderDetail.handle}}</span></p>
								<p class="box_name">交付中</p>
							</div>
							<div class="box_nav box_nav4">
								<p class="box_inner"><span>{{orderDetail.send}}</span></p>
								<p class="box_name">待发货</p>
							</div>
							<div class="box_nav box_nav5">
								<p class="box_inner"><span>{{orderDetail.unsure}}</span></p>
								<p class="box_name">待确认</p>
							</div>
							<div class="box_nav box_nav6">
								<p class="box_inner"><span>{{orderDetail.diss}}</span></p>
								<p class="box_name">已取消</p>
							</div>
						</div>
						<div>
							<table class="middle_table">
								<tr>
									<th rowspan="2">工序</th>
									<th colspan="3" style="background-color: #467696;">挤塑直切</th>
									<th style="background-color: #d1943a;">成型</th>
									<th colspan="4" style="background-color: #65b9c4;">包装</th>
								</tr>
								<tr>
									<th style="background-color: #467696;">普直</th>
									<th style="background-color: #467696;">伸直</th>
									<th style="background-color: #467696;">U直</th>
									<th style="background-color: #d1943a;">U管成型</th>
									<th style="background-color: #65b9c4;">单支联排</th>
									<th style="background-color: #65b9c4;">多支</th>
									<th style="background-color: #65b9c4;">伸缩</th>
									<th style="background-color: #65b9c4;">U型</th>
								</tr>
								<tr>
									<th>总数</th>
									<th v-for="(item,index) in gongXuVo.totals">{{item}}</th>
								</tr>
								<tr>
									<th>开机</th>
									<th v-for="(item,index) in gongXuVo.kaiji">{{item}}</th>
								</tr>
								<tr>
									<th>开机率</th>
									<th style="color: #93ef28;" v-for="(item,index) in gongXuVo.percent">{{item}}</th>
								</tr>
							</table>
						</div>
					</div>
				</dv-border-box-1>
			</div>
			<!--右侧列-->
			<div class="content-item3">
				<dv-border-box-1>
					<div class="nav_box">
						<p class="all_title">光伏清洁能源</p>
						<div class="in_box in_box1">
							<li class="line">
								<img src="@/assets/back_manage_img/szzt_1.png"
									 style="width: 24px;height: 27px;position: relative;top: 8px;"/>
								<span class="name">装机容量</span>
								<span class="sub">1.01</span>
								<span>兆瓦</span>
							</li>

							<li class="line">
								<img src="@/assets/back_manage_img/szzt_2.png"
									 style="width: 24px;height: 27px;position: relative;top: 8px;"/>
								<span class="name">等效树植</span>
								<span class="sub" style="color:#17cb2b">{{sumPlant}}</span>
								<span>棵</span>
							</li>
							<li class="line">
								<img src="@/assets/back_manage_img/szzt_3.png"
									 style="width: 24px;height: 27px;position: relative;top: 8px;"/>
								<span class="name">累计减排</span>
								<span class="sub" style="color:#e78e36">{{sumCo2}}</span>
								<span>吨</span>
							</li>
						</div>
						<p class="middle_titlens">
							<img src="@/assets/back_manage_img/szzt_4.png"
								 style="width: 24px;height: 27px;position: relative;top: 8px;margin-right: 20px;"/>光伏发电量
							(兆瓦时)
						</p>
						<div class="right_table">
							<li class="value">
								<span>{{sumGenerate}}</span>
								<span>{{thisYearSumGenerate}}</span>
								<span>{{thisMonthSumGenerate}}</span>
							</li>
							<li class="name">
								<span>累计</span>
								<span>本年</span>
								<span>本月</span>
							</li>
						</div>
						<div class="right_bottom">
							<div class="index_flex">
								<span class="_left">最高发电月：</span>
								<span class="_right">{{maxGenerateMonth}}</span>
							</div>
							<div class="index_flex">
								<span class="_left">最高发电日：</span>
								<span class="_right">{{maxGenerateDay}}</span>
							</div>
						</div>
					</div>
				</dv-border-box-1>
			</div>
		</div>
		<div class="large-board large-board2">
			<!--左 侧 列-->
			<div class="content-item1">
				<dv-border-box-1>
					<div class="nav_box">
						<p class="all_title">金利荣誉</p>
						<div class="in_box">
							<el-carousel class="zll-carousel" :interval="5000" ref="carousel">
								<el-carousel-item class="zll-carousel-item" v-for="(item,index) in honorImageList"
												  :key="index">
									<img :src="item.fileBlob" class="carousel_img" style="width: 100%;">
								</el-carousel-item>
							</el-carousel>
						</div>
					</div>
				</dv-border-box-1>
			</div>
			<!--中间列-->
			<div class="content-item2">
				<dv-border-box-1>
					<div class="nav_box">
						<p class="all_title">能耗实时监测及统计</p>
						<div style="display: flex;">
							<div class="echart" ref="echart1"></div>
							<div class="echart" ref="echart2"></div>
							<div class="echart" ref="echart3"></div>
							<div class="echart" ref="echart4"></div>
						</div>
						<div class="table_list">
							<table>
								<tr>
									<th >区域</th>
									<th v-for="(item,index) in powerMap.meter" :key="index"> {{item}}</th>

								</tr>
								<tr>
									<td>今日实时</td>
									<td style="color: #38f5ff;" v-for="(item,index) in powerMap.today">{{item}}</td>
								</tr>
								<tr>
									<td>本月</td>
									<th v-for="(item,index) in powerMap.moth" :key="index"> {{item}}</th>
								</tr>
								<tr>
									<td>本年</td>
									<th v-for="(item,index) in powerMap.year" :key="index"> {{item}}</th>
								</tr>
							</table>
						</div>
					</div>
				</dv-border-box-1>
			</div>
			<!--右侧列-->
			<div class="content-item3">
				<dv-border-box-1>
					<div class="nav_box">
						<p class="all_title">产品</p>
						<div class="in_box in_box1">
							<li class="line">
								<span class="name">品类</span>
								<span class="sub">{{productDetail.itemType}}</span>
								<span>个</span>
							</li>
							<li class="line">
								<span class="name">规格</span>
								<span class="sub">{{productDetail.grade}}</span>
								<span>种</span>
							</li>
							<li class="line">
								<span class="name">本年出件</span>
								<span class="sub">{{productDetail.boxs}}</span>
								<span>箱</span>
							</li>
							<li class="line">
								<span class="name">本年万支</span>
								<span class="sub">{{productDetail.total}}</span>
								<span>万支</span>
							</li>
							<li class="line">
								<span class="name">人均产量</span>
								<span class="sub">{{productDetail.perCapita}}</span>
								<span>万支/年</span>
							</li>
						</div>
					</div>
				</dv-border-box-1>
			</div>
		</div>
	</div>
</template>

<script>
	import "./bigScreen.scss";
	import resize from "../resize";
	import echartOption1 from './echart1'
	import echartOption2 from './echart2'
	import echartOption3 from './echart3'
	import echartOption4 from './echart4'


	export default {
		name: "bigScreen",
		data() {
			return {
				style: {}, //缩放样式
				timestap: "0",
				nowTime: "",
				nowDate: "",
				nowWeek: "",
				weather: "晴  0-13 ℃",
				weatherImg: require("@/assets/back_manage_img/qingtian.png"),
				sysInfo: {sysName: "金利塑业· 5G数字化中台"},
				showIndex: 0,
				configData: {
					carousel: 'page',
					waitTime: 5000,
					headerBGC: '#0d2235',
					oddRowBGC: '#0d2235',
					evenRowBGC: '#0f2940',
					headerHeight: '50',
					align: 'center',
					rowNum: 8,
					header: ['工单号', '工单类型', '发起人', '时间', '状态'],
					columnWidth: ['200', '170', '150', '260', '120'],
					data: [
						['2302190022', '点检报修', '徐佩', '2023-02-19 16:01', '<span style="color: #9e9e9e">已完成</span>'],
						['2302180021', '故障报修', '颜康', '2023-02-18 14:34', '<span style="color: #f44336">维修中</span>'],
						['2302140019', '巡检报修', '颜康', '2023-02-14 18:22', '<span style="color: #7bf780">待确认</span>'],
						['2302140018', '点检报修', '赵新将', '2023-02-14 17:44', '<span style="color: #7bf780">待确认</span>'],
						['2302080017', '故障报修', '吴建华', '2023-02-08 12:32', '<span style="color: #9e9e9e">取消</span>'],
						['2302030016', '保养报修', '周立军', '2023-02-03 11:44', '<span style="color: #9e9e9e">已完成</span>'],
						['2302020015', '点检报修', '李梓林', '2023-02-02 15:56', '<span style="color: #9e9e9e">已完成</span>'],
						['2301160011', '故障报修', '颜康', '2023-01-16 18:27', '<span style="color: #9e9e9e">已完成</span>'],
						['2302020015', '巡检报修', '李梓林', '2023-02-02 17:10', '<span style="color: #9e9e9e">取消</span>'],
						['2301160011', '点检报修', '颜康', '2023-01-16 13:04', '<span style="color: #9e9e9e">已完成</span>'],
					]
				},
				dataMaintainList: [],//科研及创新实例列表
				honorImageList: [],//荣誉和精彩
				interval1: null,

				//光伏清洁能源
				sumPlant: '',//等效树植
				sumCo2: '',//减排
				sumGenerate: '',//累计生产
				thisYearSumGenerate: '',//本年
				thisMonthSumGenerate: '',//本月
				maxGenerateMonth: '',//最高发电月
				maxGenerateDay: '',//最高发电日

				orderDetail: {total: '', complete: '', handle: '', unsure: '', diss: '', send: ''},
				gongXuVo: {totals: [], kaiji: [], percent: []},
				productDetail: {total: '', boxs: '', itemType: '', grade: ''},

				powerMap: {
					meter: ['', '', '', '', ''],
					today: [0, 0,0, 0, 0],
					moth: [0, 0,0, 0, 0],
					year: [0, 0,0, 0, 0],
				},
			};
		},
		methods: {
			pageShow() {//页面初始宽高显示 和 页面大小改变监听
				this.style = resize.setScale();
				window.onresize = () => {
					this.style = resize.setScale();
				};
			},

			getDataMaintains() {
				let self = this;
				self.$http({
					url: "/jinl/front/getFrontDisplay",
					method: "post",
					params: {type: 'data_center'}
				}).then(resp => {
					if (resp.success) {
						self.dataMaintainList = [];
						let frontDisplays = resp.result.frontDisplays || [];
						if (frontDisplays.length == 0) {
							return;
						}
						for (let data of frontDisplays) {
							let pageKey = data.pageKey;
							if (!pageKey || data.pageType != 'table') {
								continue;
							}
							self.dataMaintainList.push(data);
						}
						// self.bubbleSort(self.dataMaintainList);
						self.changefrontDisplaysPages()
					}
				});
			},


			changefrontDisplaysPages() {//左上角科研及创新实力 分页
				let self = this;
				let page = 1;
				let dataMaintainList = self.dataMaintainList;
				let pages = Math.ceil(dataMaintainList.length / 4);
				if (self.interval1) {
					clearInterval(self.interval1);
				}
				if (dataMaintainList.length > 4) {
					self.dataMaintainList = self.dataMaintainList.slice(0, 4)
					self.interval1 = setInterval(function () {
						let _html = [];
						dataMaintainList.forEach((item, index) => {
							if (index >= (page - 1) * 4 && index < page * 4) {
								_html.push(item)
							}
							self.dataMaintainList = _html
						})
						page++
						if (page > pages) {
							page = 1
							_html = [];
						}
					}, 1000 * 5)
				}
			},
			getEchartData() {
				let self = this;
				let maxPower = 0.0;
				let todayPowers = this.powerMap.today;
				for(let i =0 ;i <todayPowers.length;i++ ){
					maxPower = maxPower > todayPowers[i]?maxPower:todayPowers[i];
				}
				if(maxPower <= 120){
					maxPower = 120;
				}else if(maxPower <= 600){
					maxPower = 600;
				}else if(maxPower <= 1200){
					maxPower = 1200;
				}else if(maxPower <= 2300){
					maxPower = 2300;
				}else if(maxPower <= 3300){
					maxPower = 3300;
				}else if(maxPower <= 4200){
					maxPower = 4200;
				}else if(maxPower <= 5100){
					maxPower = 5100;
				}else if(maxPower <= 6000){
					maxPower = 6000;
				}else if(maxPower <= 7200){
					maxPower = 7200;
				}else {
					maxPower = parseInt(maxPower/3)*3;
				}
				let currentPower = 0.0;
				let headers = this.powerMap.meter;
				let echart1 = self.$echarts.init(self.$refs.echart1);
				let option1 = echartOption1.option;
				option1.title[0].text = '{val|' + todayPowers[0] + '}\n{name|' + headers[0] + '}';
				currentPower = todayPowers[0];

				option1.series[0].axisLine.lineStyle.color[0][0] = (currentPower/maxPower).toFixed(2);
				option1.series[0].data[0].value = currentPower;
				option1.series[1].max = maxPower;
				option1.series[2].axisLine.lineStyle.color[0] = [(currentPower/maxPower).toFixed(2) - 0.001, 'rgba(0,0,0,0)']
				option1.series[2].axisLine.lineStyle.color[1] = [(currentPower/maxPower).toFixed(2) + 0.003, '#C34743']
				option1.series[3].max = maxPower;
				option1.series[3].data[0].value = currentPower;
				echart1.setOption(option1);

				let echart2 = self.$echarts.init(self.$refs.echart2);
				let option2 = echartOption2.option;
				option2.title[0].text = '{val|' + todayPowers[1] + '}\n{name|' + headers[1] + '}';
				currentPower = todayPowers[1];

				option2.series[0].axisLine.lineStyle.color[0][0] = (currentPower/maxPower).toFixed(2);
				option2.series[0].data[0].value = currentPower;
				option2.series[1].max = maxPower;
				option2.series[2].axisLine.lineStyle.color[0] = [(currentPower/maxPower).toFixed(2) - 0.001, 'rgba(0,0,0,0)']
				option2.series[2].axisLine.lineStyle.color[1] = [(currentPower/maxPower).toFixed(2) + 0.003, '#C34743']
				option2.series[3].max = maxPower;
				option2.series[3].data[0].value = currentPower;

				echart2.setOption(option2);

				let echart3 = self.$echarts.init(self.$refs.echart3);
				let option3 = echartOption3.option;
				option3.title[0].text = '{val|' + todayPowers[2] + '}\n{name|' + headers[2] + '}';
				currentPower = todayPowers[2];
				option3.series[0].axisLine.lineStyle.color[0][0] = (currentPower/maxPower).toFixed(2);
				option3.series[0].data[0].value = currentPower;
				option3.series[1].max = maxPower;
				option3.series[2].axisLine.lineStyle.color[0] = [(currentPower/maxPower).toFixed(2) - 0.001, 'rgba(0,0,0,0)']
				option3.series[2].axisLine.lineStyle.color[1] = [(currentPower/maxPower).toFixed(2) + 0.003, '#C34743']
				option3.series[3].max = maxPower;
				option3.series[3].data[0].value = currentPower;
				echart3.setOption(option3);

				let echart4 = self.$echarts.init(self.$refs.echart4);
				let option4 = echartOption4.option;
				option4.title[0].text = '{val|' + todayPowers[3] + '}\n{name|' + headers[3] + '}';
				currentPower = todayPowers[3];
				option4.series[0].axisLine.lineStyle.color[0][0] = (currentPower/maxPower).toFixed(2);
				option4.series[0].data[0].value = currentPower;
				option4.series[1].max = maxPower;
				option4.series[2].axisLine.lineStyle.color[0] = [(currentPower/maxPower).toFixed(2) - 0.001, 'rgba(0,0,0,0)']
				option4.series[2].axisLine.lineStyle.color[1] = [(currentPower/maxPower).toFixed(2) + 0.003, '#C34743']
				option4.series[3].max = maxPower;
				option4.series[3].data[0].value = currentPower;
				echart4.setOption(option4);
				window.onresize = function () {
					echart1.resize()
					echart2.resize()
					echart3.resize()
					echart4.resize()
				}
			},
			getdateFormat() {//显示时间
				var _this = this;
				let wk = new Date().getDay();
				let yy = String(new Date().getFullYear());
				let mm = new Date().getMonth() + 1;
				let dd = String(new Date().getDate() < 10 ? "0" + new Date().getDate() : new Date().getDate());
				let hou = String(new Date().getHours() < 10 ? "0" + new Date().getHours() : new Date().getHours());
				let min = String(new Date().getMinutes() < 10 ? "0" + new Date().getMinutes() : new Date().getMinutes());
				let sec = String(new Date().getSeconds() < 10 ? "0" + new Date().getSeconds() : new Date().getSeconds());
				let weeks = ["周日", "周一", "周二", "周三", "周四", "周五", "周六",];
				let week = weeks[wk];
				_this.nowTime = hou + ":" + min + ":" + sec;
				_this.nowDate = yy + "." + mm + "." + dd;
				_this.nowWeek = week;
			},

			async getWeather() {
				let self = this;
				self.$http({
					url: "/jinl/firstPage/getForecast",
					method: "post",
					params: {cityCode: '101220701'}
				}).then(resp => {
					let result = resp.result;
					let weather = result ? result.data.forecast[0] : {};
					let high = weather.high;
					let low = weather.low;
					let type = weather.type;
					high = high.replace(/[^0-9]/gi, "");
					low = low.replace(/[^0-9]/gi, "");
					self.weather = type + low + ' - ' + high
					if (type.indexOf('雨') > -1) {
						self.weatherImg = require('@/assets/back_manage_img/xaiyu.png');
					}
					if (type.indexOf('晴') > -1) {
						self.weatherImg = require('@/assets/back_manage_img/qingtian.png');
					}
					if (type.indexOf('云') > -1 || type.indexOf('阴') > -1) {
						self.weatherImg = require('@/assets/back_manage_img/tianqi.png');
					}
				});
			},

			//金利荣誉图片
			getImagesList() {
				let self = this;
				self.$http({
					url: "/jinl/file/queryBoardFileList",
					method: "post",
					params: {type: 'honor'}
				}).then(resp => {
					if (resp.success) {
						self.honorImageList = [];
						for (let data of resp.result) {
							if (data.fileCheck != 1) {
								continue;
							}
							data.fileCheck = parseInt(data.fileCheck);
							data.fileBlob = data.fileUrl;
							data.fileName = data.displayName;
							self.honorImageList.push(data)
						}
					}
				});
			},

			//光伏清洁能源
			getBigBordPhotovoltaicData() {
				let self = this;
				self.$http({
					url: "/jinl/photovoltaic/bigBordPhotovoltaicData",
					method: "post",
				}).then(resp => {
					if (resp.success) {

						self.sumPlant = resp.result['sumPlant'];
						self.sumCo2 = resp.result.sumCo2;
						self.sumGenerate = resp.result.sumGenerate;
						self.thisYearSumGenerate = resp.result.thisYearSumGenerate;
						self.thisMonthSumGenerate = resp.result.thisMonthSumGenerate;
						self.maxGenerateDay = resp.result.maxGenerateDay;
						self.maxGenerateMonth = resp.result.maxGenerateMonth;
					}
				});
			},

			getFirstPlanManageInfo() {
				let self = this;
				self.$http({
					url: "/jinl/firstPage/getFirstPlanManageInfo",
					method: "post",
				}).then(resp => {
					if (resp.success) {
						self.productDetail = resp.result;
						if(self.productDetail.total){
							self.productDetail.total = parseFloat(self.productDetail.total).toFixed(2);
						}
					}
				});
			},

			getFirstPageYearMeterPowers() {
				let self = this;
				self.$http({
					url: "/jinl/meterPower/getFirstPageYearMeterPowers",
					method: "post",
					params:{notToken:true}
				}).then(resp => {
					if (resp.success) {
						console.log(resp.result);
						self.powerMap = resp.result;
						self.getEchartData();
					}
				});
			},

			//工序
			getDyDeviceGongXu() {
				let self = this;
				self.$http({
					url: "/jinl/firstPage/getDyDeviceGongXu",
					method: "post",
					params: {notToken: true}
				}).then(resp => {
					self.gongXuVo.totals = [0, 0, 0, 0, 0, 0, 0, 0];
					self.gongXuVo.kaiji = [0, 0, 0, 0, 0, 0, 0, 0];
					self.gongXuVo.percent = ['0.00%', '0.00%', '0.00%', '0.00%', '0.00%', '0.00%', '0.00%', '0.00%'];
					if (resp.success) {
						let gongXuVos = resp.result || [];
						console.log('=======gongXuVos========')
						console.log(gongXuVos)
						for (let data of gongXuVos) {
							let processName = data.processName;
							let itemName = data.itemName;
							let running = parseFloat(data.running);
							console.log("running",running)
							let total = parseFloat(data.total);
							let per = '0.00%';
							if (total > 0) {
								per = ((running / total) * 100).toFixed(2) + '%';
							}
							let index = 0;
							if (processName == '挤塑直切') {
								index = 0;
								if (itemName == '伸直') {
									index = 1;
								} else if (itemName == 'U直') {
									index = 2;
								}
							} else if (processName == '成型') {
								index = 3;
							} else if (processName == '包装') {
								index = 4;
								if (itemName == '多支') {
									index = 5;
								} else if (itemName == '伸缩') {
									index = 6;
								} else if (itemName == 'U型') {
									index = 7;
								}
							}else if (processName == '电表'||processName == '配拌投料'){
								index = null;
							}
							self.gongXuVo.totals[index] = total;
							self.gongXuVo.kaiji[index] = running;
							self.gongXuVo.percent[index] = per;
						}
						console.log("wqq",self.gongXuVo)
						console.log("wqqlll",self.gongXuVo.kaiji)
					}

				});
			},

			getYearFirstPageOrderInfo() {
				let self = this;
				self.$http({
					url: "/jinl/firstPage/getYearFirstPageOrderInfo",
					method: "post",
					params: {notToken: true}
				}).then(resp => {
					if (resp.success) {
						self.orderDetail = resp.result;
					}
				});
			},

			// getTodayPhotovoltaicManage() {
			// 	let self = this;
			// 	self.$http({
			// 		url: "/jinl/firstPage/getTodayPhotovoltaicManage",
			// 		method: "post",
			// 		params:{notToken:true}
			// 	}).then(resp => {
			// 		if (resp.success) {
			// 			self.photoVolta = resp.result;
			// 		}
			// 	});
			// },

		},
		mounted() {
			let self = this;
			setInterval(() => {
				self.getdateFormat();
			}, 1000);
			self.getWeather();
			setInterval(() => {
				self.getWeather();
			}, 1000 * 3600);

			self.getDataMaintains();
			setInterval(() => {
				self.getDataMaintains();
			}, 1000 * 60);


			//荣誉和精彩
			self.getImagesList();
			setInterval(() => {
				self.getImagesList();
			}, 1000 * 60);

			//光伏清洁能源
			self.getBigBordPhotovoltaicData();
			setInterval(() => {
				self.getBigBordPhotovoltaicData();
			}, 1000 * 60 * 24);


			self.getYearFirstPageOrderInfo();
			setInterval(() => {
				self.getYearFirstPageOrderInfo();
			}, 1000 * 30);

			self.getDyDeviceGongXu();
			setInterval(() => {
				self.getDyDeviceGongXu();
			}, 1000 * 45);

			self.getFirstPlanManageInfo();
			setInterval(() => {
				self.getFirstPlanManageInfo();
			}, 1000 * 32);

			self.getFirstPageYearMeterPowers();
			setInterval(() => {
				self.getFirstPageYearMeterPowers();
			}, 1000 * 42);
			self.pageShow()
			self.changefrontDisplaysPages()
			function calculateDaysBetweenDates(startDate, endDate) {
				const start = new Date(startDate);
				const end = new Date(endDate);
				const millisecondsPerDay = 1000 * 60 * 60 * 24;
				const days = Math.floor((end - start) / millisecondsPerDay);
				return days;
			}
			const daysSinceMayFirst = calculateDaysBetweenDates('2024-05-01', new Date().toISOString());
			this.timestap = daysSinceMayFirst.toString();
		},
	};
</script>

<style scoped>
</style>
